#include <iostream>
#include <fstream>
using namespace std;

struct Student {
	char name[20];
	int score;
};

void solve()
{
	Student s;
	ifstream inFile("D:/temp/students.dat", ios::in | ios::binary);
	if (!inFile)
	{
		cout << "error" << endl;
		return;
	}
	while (inFile.read((char*)&s, sizeof(s))) {
		int readedBytes = inFile.gcount();
		cout << readedBytes << " " << s.name << " " << s.score << endl;
	}
	inFile.close();
}

int main()
{
	solve();
	return 0;
}